package com.clouddot.baipai.ui.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.clouddot.baipai.R;
import com.clouddot.baipai.http.entity.response.getCourseByIdResponse;
import com.clouddot.baipai.http.entity.response.getLeaveRecordResponse;

import java.util.List;

/**
 * Created by wxy on 2018/8/26.
 */

public class V_LeaveRecordAdapter extends BaseQuickAdapter<getLeaveRecordResponse.LeaveInfo, BaseViewHolder> {

    public V_LeaveRecordAdapter(List<getLeaveRecordResponse.LeaveInfo> mDataList) {
        super(R.layout.v_adapter_leave_record_item, mDataList);
    }

    @Override
    protected void convert(BaseViewHolder helper, final getLeaveRecordResponse.LeaveInfo item) {
        helper.setText(R.id.name, item.LeaveTypeText);
        helper.setText(R.id.time, item.LeaveStartText + "~" + item.LeaveEndText);
    }

    private AdapterItemClickListener listener;

    public void setOnClickListener(AdapterItemClickListener listener) {
        this.listener = listener;
    }

    public interface AdapterItemClickListener {
        void onClicked(getCourseByIdResponse.courseInfoByid position);
    }


}
